package com.stx.threeGrup.service.impl;

import com.stx.threeGrup.mapper.automapper.PictureMapper;
import com.stx.threeGrup.model.automodel.Picture;
import com.stx.threeGrup.service.PictureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PictureServiceImpl implements PictureService {

    @Autowired
    PictureMapper pictureMapper;

    @Override
    public List<String> getPictureUrl() {
         return pictureMapper.selectAllURL();
    }

    @Override
    public boolean addPicture(Picture picture) {
        boolean rs = false;
       if (pictureMapper.insert(picture)>0){
           rs=true;
       }
        return rs;
    }
}

